import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 98152
 * Date: 2024-10-17
 * Time: 20:42
 */
public class Test3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] arr = new int[n][];
        for(int row = 0; row < n; row++) {
            arr[row] = new int[row+1];
            int j = row;
            arr[row][0] = 1;
            arr[row][j] = 1;
            for(int col = 1; col < j; col++) {
                arr[row][col] = arr[row-1][col-1] + arr[row-1][col];
            }
        }
        for(int i = 0; i < arr.length; i++) {
            for(int j = 0; j < arr[i].length; j++) {
                System.out.printf("%5d", arr[i][j]);
            }
            System.out.println();
        }
    }
}
